package thread.basepackage.t5;


/**
 * Created by cuihao on 2017/11/28.
 */
public class Run {
    public static void main(String[] args) {
        try {
            MyThread thread = new MyThread();
            thread.start();
            System.out.println(Thread.currentThread().getName());
            Thread.sleep(50);
            thread.interrupt(); // 可以停止thread线程，但是这条语句是在Main线程里的，main线程休眠50毫秒所以不会执行这条语句。
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
